<script language="javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js "></script>
<script language="javascript" src="http://api.weixinzjit.com/api/www/js/wx_jsapi_v_1.0.js"></script>
<script language="JavaScript">

var ShareTitle = '10元电影看不停';
var ShareDesc = "告诉你一个看电影“浦”遍10元的方法！";
var ShareUrl = 'http://api.weixinzjit.com/xpgy/index.php';
var ShareImg = 'http://api.weixinzjit.com/xpgy/img/share_ico.jpg';

var ApiList = [
	//与分享有关的接口
	'onMenuShareTimeline',
	'onMenuShareAppMessage', 
];

function resetShare() {
	wx.onMenuShareAppMessage({
		title: ShareTitle,
		desc: ShareDesc,
		link: ShareUrl,
		imgUrl: ShareImg,
		trigger: function(res) { /* alert('用户点击发送给朋友'); */ },
		success: function(res) { /* alert('已分享'); */ },
		cancel: function(res) { /* alert('已取消'); */ },
		fail: function(res) { /* alert(JSON.stringify(res)); */ }
	});
	wx.onMenuShareTimeline({ // 2.2 监听"分享到朋友圈"按钮点击、自定义分享内容及分享结果接口
		title: ShareDesc,
		link: ShareUrl,
		imgUrl: ShareImg,
		trigger: function(res) { /* alert('用户点击分享到朋友圈'); */ },
		success: function(res) { /* alert('已分享'); */ },
		cancel: function(res) { /* alert('已取消'); */ },
		fail: function(res) { /* alert(JSON.stringify(res)); */ }
	});
}
var CallbackList = function() { 
	resetShare();  
};
 

$(function(){
	ZJWX(ApiList,CallbackList,false);
});
</script>